<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>卓新会计培训学校</title>
		<%@ include file="/WEB-INF/content/jsp/common/jspcommon.jsp"%>
		<script type="text/javascript">
		function ajaxFindCourseList(gid){
			//var gid=$("select[name=vo.grade.id]").find("option:selected").val();
			if($.trim(gid)!=""){
				$.ajax({
			        type:"post",
			        url:"<c:url value='/jsp/enter/ajaxFindCourseList.json' />",
			        cache:false,
			        data:{"so.grade.id":gid,"rnd":Math.random()},
			        dataType:"json",
					success:function(msg){
						var obj = eval(msg);
						var courseList=obj.courseList;
						
						if(courseList!=null && courseList.length>0){
							var html="";
							for(var i=0;i<courseList.length;i++){
								html+="<option value=\""+courseList[i].id+"\">"+courseList[i].name+"</option>";
							}
							$("#courseId").empty();
							$("#courseId").append(html);
						}
			        }
				});
			}
		}
		</script>
	</head>
	<body>
		<div class="divf">
			<!-- 顶部文件 -->
			<%@ include file="/WEB-INF/content/jsp/common/top.jsp"%>
			
			<!-- 网站导航 -->
			<%@ include file="/WEB-INF/content/jsp/common/navigation.jsp"%>
			
			<!-- 分享 -->
			<%@ include file="/WEB-INF/content/jsp/common/share.jsp"%>
			
			<div class="center">
				<!-- banner -->
				<%@ include file="/WEB-INF/content/jsp/common/banner.jsp"%>
				
				<!-- 新闻分类  -->
				<%@ include file="/WEB-INF/content/jsp/common/left.jsp"%>
				
				<div class="c_right">
					<div class="cr_tit"><b class="cr_tit_l">在线报名</b></div>
					<div class="cr_cent1 about_text">
						<div class="inguest">
							<p>在线报名 请填写内容（<b>*</b>为必填项）</p>
							<form name="form1" action="<c:url value='/jsp/enter/save.jhtml' />" method="post" onsubmit="return Validator.Validate(this,3);">				
							<table width="100%" border="0" align="center" cellpadding="2" cellspacing="2" class="zx_01">
								<tbody>
									<tr>
										<th width="90"><b>*</b>课程选择:</th>
										<td>
											<select name="vo.grade.id" onchange="ajaxFindCourseList(this.value)" dataType="Require" msg="请选择班">
												<option value="">---请选择---</option>
												<c:forEach var="grade" items="${gradeList}">
													<option value="${grade.id}">${grade.name}</option>
												</c:forEach>
											</select>&nbsp;&nbsp;
											<select id="courseId" name="vo.course.id" dataType="Require" msg="请选择课程">
												<option value="">---请选择---</option>
											</select>
										</td>
									</tr>
									<tr>
										<th width="90"><b>*</b>姓&nbsp;&nbsp;&nbsp;名:</th>
										<td><input name="vo.name" type="text" class="inp_text" maxlength="50" value="${vo.name}" dataType="Require" msg="请输入名称"></td>
									</tr>
									<tr>
										<th width="90"><b>*</b>电&nbsp;&nbsp;&nbsp;话:</th>
										<td><input name="vo.phone" type="text" class="inp_text" maxlength="50" value="${vo.phone}" dataType="Require" msg="请输入电话"/></td>
									</tr>
									<tr>
										<th width="90">QQ号码:</th>
										<td><input name="vo.qq" type="text" maxlength="50" class="inp_text" value="${vo.qq}"></td>
									</tr>
									<tr>
										<th width="90">邮&nbsp;&nbsp;&nbsp;箱:</th>
										<td><input name="vo.email" type="text" class="inp_text" maxlength="50" value="${vo.email}"></td>
									</tr>
									<tr>
										<th width="90">性&nbsp;&nbsp;&nbsp;别:</th>
										<td>
											<label><input name="vo.sex" type="radio" value="MALE">男</label>
											<label><input name="vo.sex" type="radio" value="FEMALE" checked="checked">女</label>
										</td>
									</tr>
									<tr>
										<th width="90">单&nbsp;&nbsp;&nbsp;位:</th>
										<td><input name="vo.company" type="text" class="inp_text" maxlength="50" value="${vo.company}"></td>
									</tr>
									<tr>
										<th width="90">联系地址：</th>
										<td><input name="vo.address" type="text" class="inp_text" maxlength="50" value="${vo.address}"></td>
									</tr>
									<tr>
										<th width="90">&nbsp;</th>
										<td><input type="submit" value="提交" /></td>
									</tr>
								</tbody>
							</table>
							</form>
						</div>
				
					</div>
				</div>
				
				<!-- 底部文件 -->
				<%@ include file="/WEB-INF/content/jsp/common/fooder.jsp"%>
				
				<!-- 在线资讯 -->
				<%@ include file="/WEB-INF/content/jsp/common/online.jsp"%>
			</div>			
		</div>
	</body>
</html>